<template>
  <div class="home">
    <home-head></home-head>
    <home-swiper :banner="banner" ></home-swiper>
    <home-icons :icons="icons"></home-icons>
  </div>
</template>

<script>
import HomeHead from './components/Head'
import HomeSwiper from './components/Swiper'
import HomeIcons from './components/icons'
import {HomeModel} from '../../models/HomeModel'
const homemodel = new HomeModel()
export default {
  name: 'home',
  components: {
    HomeHead,
    HomeSwiper,
    HomeIcons
  },
  data(){
    return{
      banner:[],
      icons:[],
      recommendList:[],
      weekendList:[]
    }
  },
  mounted(){
    homemodel.getHome().then(res=>{      
      let data = res.data.data;
      let { banner,icons,recommendList,weekendList } = data
      this.banner = banner;
      this.icons = icons;
      this.recommendList = recommendList;
      this.weekendList = weekendList
    })
  }
}
</script>
<style lang="scss" scoped>

</style>

